package com.yao.shardingdemo.mapper;

import com.yao.shardingdemo.entity.Order;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Component;

/**
 * @author Henry Yao
 */
@Mapper
@Component
public interface OrderMapper {
    /**
     * 插入订单
     * @param order 订单
     */
    @Insert("insert into t_order(uid,price,date,pid) values(#{uid},#{price},#{date},#{pid})")
    void insertOrder(Order order);
}
